<?php
$this->lang->load('template');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0048)http://www.fav365.com/ball/?m=admin&c=good&a=add -->
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK 
href="/css/admin.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3395" name=GENERATOR>
<STYLE type=text/css>.STYLE1 {
	COLOR: #ff0000
}
.opt_lavel_0{
	font-weight:600
}
</STYLE>
</HEAD>
<BODY>
<DIV class=admin_box>
<DIV class=admin_boxtop></DIV>
<DIV class=admin_boxmain>
<?php
$url = site_url('modules/options?template=options&selected='.$result['modules']);
$options = file_get_contents($url);
?>
<?=form_open('roles/save');?>
<input type="hidden" value="<?=intval($result['role_id'])?>" name="role_id" />
<input type="hidden" value="<?=site_url('roles/admin')?>" name="redirect" />
<TABLE cellSpacing=0 cellPadding=0 width="96%" align=center border=0>
  <TBODY>
  <TR>
    <TD>
      <H1 class=title>
	  <?php
	  if(!isset($result)):
	  ?>
	  <?=$this->lang->line('tpl_act_add').$this->lang->line('tpl_roles');?>
	  <?php else:?>
	  <?=$this->lang->line('tpl_act_edit').$this->lang->line('tpl_roles');?>-<?=$result['name']?>
	  <?php endif;?>
	  </H1></TD></TR></TBODY></TABLE>
	  <div>
	  <?=$this->validation->error_string; ?>
	  </div>
<TABLE class=table cellSpacing=1 cellPadding=5 width="96%" align=center 
border=0>
  <TBODY>
  <TR>
    <TD class="tdbg bold" width="24%">
      <DIV align=right>
	  <?=$this->lang->line('tpl_roles').$this->lang->line('tpl_name');?>
	  </DIV></TD>
    <TD><INPUT class=inputstyle name="name" value="<?=$result['name']?>"> <SPAN class=STYLE1>*</SPAN></TD></TR>
   <TR> 
	<TD class="tdbg bold">
      <DIV align=right>
	  <?=$this->lang->line('tpl_roles').$this->lang->line('tpl_desc');?>
	  </DIV></TD>
    <TD><INPUT class=inputstyle type="text" name="description" value="<?=$result['description']?>"></TD></TR>
	<TR>
    <TD class="tdbg bold" width="24%">
      <DIV align=right>
	  <?=$this->lang->line('tpl_roles').$this->lang->line('tpl_module');?>
	  </DIV></TD>
    <TD>
		<SELECT class=inputstyle name="modules[]" multiple style="width:300px; height:250px;">
            <?=$options?>
          </SELECT>
	</TD></TR>
  <TR>
    <TD colSpan=2>
      <DIV align=center><INPUT class=btn type=submit value="<?=$this->lang->line('tpl_submit');?>" name=Submit> <INPUT class=btn onclick=history.back(-1) type=button value="<?=$this->lang->line('tpl_returnback');?>"> 
    </DIV></TD></TR></TBODY></TABLE></FORM></DIV>
<DIV class=admin_boxbottom></DIV></DIV></BODY></HTML>
